//
//  OrderSongerListWithName.m
//  DayByDay
//
//  Created by dllo on 16/5/20.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "OrderSongerListWithName.h"
#import "ChineseToPinyin.h"

@implementation OrderSongerListWithName

+ (NSDictionary *)sortWithArray:(NSMutableArray<SongerListDataListModel *> *)array {
    NSMutableDictionary *dic = [NSMutableDictionary dictionary];
    for (SongerListDataListModel *model in array) {
       NSString *str = [NSString stringWithFormat:@"%c",[ChineseToPinyin sortSectionTitle:model.name] + 32];
        if (![[dic allKeys] containsObject:str]) {
            NSMutableArray *valueArr = [NSMutableArray arrayWithObjects:model, nil];
            [dic setObject:valueArr forKey:str];
        } else {
            NSMutableArray *array1 = [dic valueForKey:str];
            [array1 addObject:model];
        }
    }
    return dic;
    //saklfjklsdf
}

@end
